Aspecto:
env_results %>% head
## channel id mon day yr Nitrogen Phosphorus flo_out precip evap
## 1 1 1 1 31 2000 1.100e+04 4.187e+02 270.600 1.529000 3.026e+06
## 2 5 8 1 31 2000 1.032e+04 4.186e+02 270.100 1.568000 1.214e+00
## 3 8 14 1 31 2000 1.024e+04 4.186e+02 269.800 7.110000 2.071e+07
## 4 13 33 1 31 2000 1.022e+04 4.185e+02 267.800 13.250000 2.094e+07
## 5 18 51 1 31 2000 1.274e+03 3.249e+02 201.600 2.907000 2.285e+00
## 6 25 67 1 31 2000 2.947e-01 7.622e-04 1.176 0.002365 1.017e-02
## date_env P_Concentration N_Concentration scenario subbasin
## 1 2000-01-31 5.969530e-04 1.568303e-02 sc1 13
## 2 2000-01-31 5.979153e-04 1.474077e-02 sc1 12
## 3 2000-01-31 5.985801e-04 1.464276e-02 sc1 11
## 4 2000-01-31 6.029064e-04 1.472331e-02 sc1 10
## 5 2000-01-31 6.217620e-04 2.438057e-03 sc1 4
## 6 2000-01-31 2.500499e-07 9.668026e-05 sc1 3
En la imagen, donde los channels estan en azul y la subcuenca en negro, se nota que no están incluidos todos los channels.
Canales y Subcuencas del archivo hru2.shp
Escenarios:
plotly::ggplotly(
ggplot(env_results, aes(x=scenario, y=P_Concentration))+
geom_boxplot()+
facet_wrap(~subbasin,scales = "free_y")+
scale_y_continuous(limits = quantile(env_results$P_Concentration, c(0.10, 0.90)))+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
)
plotly::ggplotly(
ggplot(env_results, aes(x=scenario, y=N_Concentration))+
geom_boxplot()+
facet_wrap(~subbasin,scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))+
scale_y_continuous(limits = quantile(env_results$N_Concentration, c(0.10, 0.90)))
)
plotly::ggplotly(
ggplot(env_results, aes(x=scenario, y=flo_out))+
geom_boxplot()+
facet_wrap(~subbasin, scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))+
scale_y_continuous(limits = quantile(env_results$flo_out, c(0.10, 0.90)))
)
Notar que el nivel permitido por dinama es de hasta 0.25 mg/L en P y 10 mg/L en N. A continuación los resultados por canal y subcuenca.
Los resultados solo por subcuenca son los siguientes:
El primer grafico muestra todos con la misma escala para detectar cuales son los años con mas riego. El resto estan por escala de cada año.
irr_yr <-
readRDS("C:/Users/Usuario/Desktop/Git/Tesis/San_Salvador/Data_Simulaciones_Eco/irr_yr.RDS")
irr_yr<-
irr_yr %>% plyr::join(hru_info, by="hru")
irr_yr %>% head
## # A tibble: 6 x 9
## # Groups: hru [1]
## hru yr irr_sum irr_cost scen area lu_mgt Rotacion_riego Subbasin
## <dbl> <chr> <dbl> <dbl> <chr> <dbl> <chr> <dbl> <dbl>
## 1 11 2000 45 29.2 sc1 7.34 agrc3_lum 1 1
## 2 11 2001 22.5 14.6 sc1 7.34 agrc3_lum 1 1
## 3 11 2005 90 58.5 sc1 7.34 agrc3_lum 1 1
## 4 11 2007 22.5 14.6 sc1 7.34 agrc3_lum 1 1
## 5 11 2008 135 87.8 sc1 7.34 agrc3_lum 1 1
## 6 11 2009 90 58.5 sc1 7.34 agrc3_lum 1 1
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_sum))+
geom_boxplot()+
facet_wrap(~Subbasin)+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_sum))+
geom_boxplot()+
facet_wrap(~yr,scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_sum))+
geom_boxplot()+
facet_wrap(~Subbasin,scales = "free_y" )+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_sum))+
geom_boxplot()+
facet_wrap(~yr,scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_sum))+
geom_boxplot()+
facet_wrap(~Rotacion_riego, scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_cost))+
geom_boxplot()+
facet_wrap(~Subbasin,scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_cost))+
geom_boxplot()+
facet_wrap(~yr,scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_cost))+
geom_boxplot()+
facet_wrap(~Rotacion_riego, scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_sum/area))+
geom_boxplot()+
facet_wrap(~Subbasin, scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_sum/area))+
geom_boxplot()+
facet_wrap(~yr,scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_sum/area))+
geom_boxplot()+
facet_wrap(~Rotacion_riego, scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_cost/area))+
geom_boxplot()+
facet_wrap(~Subbasin, scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_cost/area))+
geom_boxplot()+
facet_wrap(~yr,scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
ggplot(irr_yr %>% filter(!is.na(Subbasin)), aes(x=scen, y=irr_cost/area))+
geom_boxplot()+
facet_wrap(~Rotacion_riego, scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
plotly::ggplotly(
ggplot(env_results %>% filter(scenario=="sc1") %>% filter(id==1) , aes(x=yr,y=precip))+
geom_bar(stat="identity")+
coord_flip()
)
plotly::ggplotly(
ggplot(env_results %>% mutate(estacion=case_when(mon=="1" | mon=="2" | mon=="3"~"Verano", mon=="4" | mon=="5" | mon=="6"~"Otonio", mon=="7" | mon=="8" | mon=="9"~"Invierno", mon=="10" | mon=="11" | mon=="12"~"Primavera" )) ,
aes(x=yr,y=precip))+
geom_bar(stat="identity")+
facet_wrap(~estacion,scales = "free_y")+
#+ facet_wrap(~estacion,scales = "free_y")+
theme(axis.text.x =element_text(angle=90,
hjust=1),
text = element_text(size=12))
)